<pre>

<?php

require '../D/Projectile2D.php';
require '../D/Point2D.php';

$gun = new D\Projectile2D(new D\Point2D(0.5, 1.2), new D\Point2D(0, -0.03), 0.98);

$positions = array();

for ($i = 0; $i < 200; $i++) {
	$positions[] = $gun->getPosition();
	$gun->run(1);
}

for ($i = 20; $i >= -20; $i--) {
	for ($j = -75; $j < 75; $j++) {
		$found = false;
		if ($i == 0) {
			echo '_';
			continue;
		}
		foreach ($positions as $position) {
			if (round($position->x) == $j && round($position->y) == $i) {
				$found = true;
				break;
			}
		}
		echo $found ? '@' : ' ';
	}
	echo PHP_EOL;
}

?>

</pre>
